<% if allowed_to?(:update, :meeting, meeting: meeting) %>
  <li class="dropdown__item" role="menuitem">
    <%= link_to edit_meeting_path(meeting), class: "dropdown__button"  do %>
      <span><%= t("edit_meeting", scope: "decidim.meetings.meetings.meeting") %></span>
      <%= icon "pencil-line" %>
    <% end %>
  </li>
<% end %>

<% if allowed_to?(:close, :meeting, meeting: meeting) %>
  <% caption = meeting.closed? ? t("edit_close_meeting", scope: "decidim.meetings.meetings.meeting") : t("close_meeting", scope: "decidim.meetings.meetings.meeting") %>
  <li class="dropdown__item" role="menuitem">
    <%= link_to edit_meeting_meeting_close_path(meeting_id: meeting.id, id: meeting.id), class: "dropdown__button"  do %>
      <span><%= caption %></span>
      <%= icon "lock-line" %>
    <% end %>
  </li>
<% end %>

<% if meeting.withdrawable_by?(current_user) %>
  <li class="dropdown__item" role="menuitem">
    <%= action_authorized_link_to(
          :withdraw,
          withdraw_meeting_path(meeting),
          method: :put,
          class: "dropdown__button" ,
          title: t("withdraw_btn_hint", scope: "decidim.meetings.meetings.show"),
          data: { confirm: t("withdraw_confirmation_html", scope: "decidim.meetings.meetings.show") }
        ) do %>
      <span><%= t("withdraw_meeting", scope:"decidim.meetings.meetings.show") %></span>
      <%= icon "arrow-go-back-line" %>
    <% end %>
  </li>
<% end %>
